//
//  TKYNoticeViewCell.m
//  StationHouseHelper
//
//  Created by apple on 2018/6/26.
//  Copyright © 2018年 铁科院. All rights reserved.
//

#import "TKYNoticeViewCell.h"
@interface TKYNoticeViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *imageV;

/**
 主标题
 */
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

/**
 副标题
 */
@property (weak, nonatomic) IBOutlet UILabel *detitleLabel;

/**
 时间
 */
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;

/**
 状态
 */
@property (weak, nonatomic) IBOutlet UIImageView *stateImageV;

@end
@implementation TKYNoticeViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.imageV tky_cornerWithRadius:25 borderColor:nil borderWidth:0];
    self.imageV.backgroundColor = KrandomColor;
}

- (void)setFrame:(CGRect)frame{
    //frame.origin.x += 10;
    frame.origin.y += 5;
    frame.size.height -= 5;
    //frame.size.width -= 20;
    [super setFrame:frame];
}

- (void)setMessageListModel:(TKYMessageListModel *)messageListModel{
    _messageListModel = messageListModel;
    self.titleLabel.text = messageListModel.projectName;
    self.detitleLabel.text = messageListModel.projectName;
    NSArray *array = [messageListModel.remindDate componentsSeparatedByString:@" "];
    self.timeLabel.text = array[0];
    if (messageListModel.status == 0) {
        self.stateImageV.hidden = NO;
    }else{
        self.stateImageV.hidden = YES;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
